package com.iss.jdbcUtil;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionUtil {
	public static Connection con = null;

	public static Connection getConnection() throws ClassNotFoundException,
			SQLException {
		Class.forName("com.mysql.jdbc.Driver");
		String url = "jdbc:mysql://localhost:3306/demo?useUnicode=true&characterEncoding=utf-8";
		con = DriverManager.getConnection(url, "root", "root123");
		return con;
	}

	public static void close() throws SQLException {
		con.close();
	}

}
